﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Demo2
{
    struct PersonStruct
    {
        public string name;
        public string telphone;
        public string address;
    }
    class Program
    {
        static void Main(string[] args)
        {
            PersonStruct p1 = new PersonStruct();
            p1.name = "张三";
            p1.telphone = "1234";
            p1.address = "中国";
            PersonStruct p2 = new PersonStruct();
            p2 = p1;
            p2.name = "李四";
            Console.WriteLine("姓名:{0},电话{1},地址{2}",p1.name,p1.telphone,p1.address);

            PersonClass p3 = new PersonClass();
            p3.name = "王五";
            p3.telphone = "12345";
            p3.address = "China";
            PersonClass p4 = new PersonClass();
            p4 = p3;
            p4.name = "赵六";
            Console.WriteLine("姓名:{0},电话{1},地址{2}", p3.name, p3.telphone, p3.address);
        }
    }
    class PersonClass
    {
        public string name;
        public string telphone;
        public string address;
    }
}
